package com.fang.base.utils;
/**
 * 交换函数
 * @author fang min
 *
 */
public class SwapUtils {
	public static <T> void  swap (T[] data,int first , int last){
		T temp = data[first];
		data[first] =  data[last];
		data[last] = temp;
		return;
	}

	public static void swap(int[] data, int first, int last) {
		int temp = data[first];
		data[first] =  data[last];
		data[last] = temp;
		return;
		
	}
}
